<HTML> 
<HEAD> 
	<TITLE>3rd Party ROBOTC Drivers</TITLE> 
<link href="tabs.css" rel="stylesheet" type="text/css"/> 
<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
</HEAD> 
 
<BODY bgcolor="#ffffff" link="#000000" vlink="#000000"> 
<table width="100%" bgcolor="navy" cellspacing=0 cellpadding=1 border=0> 
<tr><td><table width="100%" bgcolor="#EEEEDD" cellspacing=0 cellpadding=3 border=0> 
<tr> 
    <td width="33%" align="left"> <img src="images/LOGO_NXT.gif" width=266 height=44 border="0" alt="Mindstorms"></td> 
    <td><b><font size="+3" color="navy">3rd Party ROBOTC Drivers</font></b></td> 
    <td align="right"> <img src="images/logo.png" width=44 height=44 border="0" alt="RobotC"></td>     
</tr> 
  <tr bgcolor="#cccc99" align="right"> 
          <td colspan=3> <font face="arial" size="-1"> [<a href=main.html>Home</a>] [<a target=_top href="https://sourceforge.net/projects/rdpartyrobotcdr/">Download</a>] [<a target=_top href="http://apps.sourceforge.net/mantisbt/rdpartyrobotcdr/my_view_page.php">Submit a bug/suggestion</a>]  [<a target=_top href="http://www.robotc.net/forums/">ROBOTC Forums</a>] [<a target=_top href="http://botbench.com">Blog</a>] [<a target=_top href="http://sourceforge.net/donate/index.php?group_id=257238">Support this project</a>]</font> </td> 
</tr> 
</table></td></tr> 
</table> 
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>Angle Sensor<br/>
<small>
[<a class="el" href="group__mindsensors.html">Mindsensors</a>]</small>
</h1>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="files"></a>
Files</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mindsensors-angle_8h.html">mindsensors-angle.h</a></td></tr>

<p><tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Mindsensors Angle Sensor driver. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#gaae432a00b0d8b0c48e8000c036bdf399">MSANG_I2C_ADDR</a>&#160;&#160;&#160;0x30</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#ga7b1fe68194aeda007a279cd9253fee3e">MSANG_CMD_REG</a>&#160;&#160;&#160;0x41</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#gaf83bc1cb4fcac994768fe1bfd60d027b">MSANG_OFFSET</a>&#160;&#160;&#160;0x42</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#gad9ec71e06e24bbe6b583e314f1de203f">MSANG_ANG</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#ga92d725468826d9c90eb0b0e2641d0417">MSANG_RAW</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#gaa896c5ca9d6def6bb14da8864680cdb4">MSANG_RPM</a>&#160;&#160;&#160;0x08</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#ga2a47cc21a69e5341f9807eb90509c999">MSANG_CMD_RST_ANG</a>&#160;&#160;&#160;0x72</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#gae5c663c15332a452e2a44fcbc6bf11ad">MSANGreadAngle</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#ga841cfb291c466e2aa346118dd6760e1c">MSANGreadRPM</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#gaf22788475a686770c980d04ef6ea2eba">MSANGreadRaw</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#ga2166028ec8befe5ccc90c7e7d6e4dccc">MSANGresetAngle</a> (tSensors link)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#ga5d9f9ba2c5820e46ded2a0b092e4d65a">MSANG_I2CRequest</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msang.html#ga744407623a4c63bbca760401969a3b1c">MSANG_I2CReply</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>GlideWheel-AS Angle Sensor </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="gad9ec71e06e24bbe6b583e314f1de203f"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANG_ANG" ref="gad9ec71e06e24bbe6b583e314f1de203f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSANG_ANG&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Current angle </p>

<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00046">46</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga7b1fe68194aeda007a279cd9253fee3e"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANG_CMD_REG" ref="ga7b1fe68194aeda007a279cd9253fee3e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSANG_CMD_REG&#160;&#160;&#160;0x41</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Command register </p>

<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00042">42</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga2a47cc21a69e5341f9807eb90509c999"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANG_CMD_RST_ANG" ref="ga2a47cc21a69e5341f9807eb90509c999" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSANG_CMD_RST_ANG&#160;&#160;&#160;0x72</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Resets 0 position to current shaft angle </p>

<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00051">51</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaae432a00b0d8b0c48e8000c036bdf399"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANG_I2C_ADDR" ref="gaae432a00b0d8b0c48e8000c036bdf399" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSANG_I2C_ADDR&#160;&#160;&#160;0x30</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>HTCS2 I2C device address </p>

<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00041">41</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaf83bc1cb4fcac994768fe1bfd60d027b"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANG_OFFSET" ref="gaf83bc1cb4fcac994768fe1bfd60d027b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSANG_OFFSET&#160;&#160;&#160;0x42</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Offset for data registers </p>

<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00043">43</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga92d725468826d9c90eb0b0e2641d0417"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANG_RAW" ref="ga92d725468826d9c90eb0b0e2641d0417" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSANG_RAW&#160;&#160;&#160;0x04</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Current sensor raw value (0.5 deg accuracy) </p>

<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00047">47</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaa896c5ca9d6def6bb14da8864680cdb4"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANG_RPM" ref="gaa896c5ca9d6def6bb14da8864680cdb4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSANG_RPM&#160;&#160;&#160;0x08</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>rpms </p>

<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00048">48</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gae5c663c15332a452e2a44fcbc6bf11ad"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANGreadAngle" ref="gae5c663c15332a452e2a44fcbc6bf11ad" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MSANGreadAngle </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the current angle </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the MSANG port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>current angle or -1 if an error occurred. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-angle-test1_8c-example.html#a1">mindsensors-angle-test1.c</a>, and <a class="el" href="mindsensors-sensormux-test1_8c-example.html#a3">mindsensors-sensormux-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00067">67</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaf22788475a686770c980d04ef6ea2eba"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANGreadRaw" ref="gaf22788475a686770c980d04ef6ea2eba" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MSANGreadRaw </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the current raw sensor value </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the MSANG port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>current raw value or -1 if an error occurred. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-angle-test1_8c-example.html#a2">mindsensors-angle-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00086">86</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga841cfb291c466e2aa346118dd6760e1c"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANGreadRPM" ref="ga841cfb291c466e2aa346118dd6760e1c" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MSANGreadRPM </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the rpm that the shaft is currently rotating at </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the MSANG port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the current rpm of the shaft or -1 if an error occurred. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-angle-test1_8c-example.html#a3">mindsensors-angle-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00105">105</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga2166028ec8befe5ccc90c7e7d6e4dccc"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANGresetAngle" ref="ga2166028ec8befe5ccc90c7e7d6e4dccc" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool MSANGresetAngle </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Reset the 0 position to the current shaft angle. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the MSANG port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-angle-test1_8c-example.html#a0">mindsensors-angle-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00124">124</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="ga744407623a4c63bbca760401969a3b1c"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANG_I2CReply" ref="ga744407623a4c63bbca760401969a3b1c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> <a class="el" href="group__msang.html#ga744407623a4c63bbca760401969a3b1c">MSANG_I2CReply</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold I2C reply data </p>

<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00059">59</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga5d9f9ba2c5820e46ded2a0b092e4d65a"></a><!-- doxytag: member="mindsensors&#45;angle.h::MSANG_I2CRequest" ref="ga5d9f9ba2c5820e46ded2a0b092e4d65a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> <a class="el" href="group__msang.html#ga5d9f9ba2c5820e46ded2a0b092e4d65a">MSANG_I2CRequest</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold I2C command data </p>

<p>Definition at line <a class="el" href="mindsensors-angle_8h_source.html#l00058">58</a> of file <a class="el" href="mindsensors-angle_8h_source.html">mindsensors-angle.h</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Mar 13 2013 19:56:44 for ROBOTC Drivers by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
